package com.itheima.mapper;

import com.itheima.pojo.EntifyQueryParam;
import com.itheima.pojo.Entity;
import com.itheima.pojo.PageQuery;
import com.itheima.pojo.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface EntifyMapper {


    List<Entity> listwo(EntifyQueryParam entifyQueryParam);

    @Insert("INSERT INTO entity (sort_no,name,status,remark)values (#{sortNo},#{name},#{status},#{remark})")
    Integer add(Entity entity);

    @Delete("delete from entity where id=#{id}")
    Integer delete(Integer id);
    @Select("select  * from entity")
    List<Entity> findAll();

    @Select("select * from entity where id=#{id}")
    Entity selectById(Integer id);
    @Update("update  entity set sort_no=#{sortNo},name=#{name}," +
            "status=#{status},remark=#{remark} where id = #{id}")
    Integer update(Entity entity);
}

